#include "EventHandler.h"

void EventHandler::HandleEvent(const SDL_Event& event)
{
	switch (event.type)
	{
	case SDL_KEYDOWN:
		OnKeyboardEvent(event.key);
		break;

	case SDL_KEYUP:
		OnKeyboardEvent(event.key);
		break;

	case SDL_MOUSEMOTION:
		OnMouseMotionEvent(event.motion);
		break;

	case SDL_MOUSEBUTTONDOWN:
		OnMouseButtonDownEvent(event.button);
		break;

	case SDL_MOUSEBUTTONUP:
		OnMouseButtonUpEvent(event.button);
		break;

	case SDL_JOYAXISMOTION:
		OnJoystickAxisEvent(event.jaxis);
		break;
	}
}